package com.hex.ds.hdtp.core.app.data.contrast.service.impl;

import com.hex.ds.hdtp.core.app.data.contrast.dto.response.CrossDbContrastListResponseDto;
import com.hex.ds.hdtp.core.app.data.contrast.dto.response.CrossDbContrastTemplateResponseDto;
import com.hex.ds.hdtp.core.app.data.contrast.service.ICrossDbContrastTaskService;
import com.hex.ds.hdtp.core.inf.data.contrast.po.CrossDbContrastTaskPo;
import lombok.extern.slf4j.Slf4j;

import java.util.List;

@Slf4j
public class CrossDbContrastCronExec implements Runnable{

    String pkId;
    List<CrossDbContrastListResponseDto> contrastLists;
    CrossDbContrastTaskPo contrastTas;
    ICrossDbContrastTaskService contrastTaskService;
    CrossDbContrastTemplateResponseDto contrastTemplate;

    public CrossDbContrastCronExec(CrossDbContrastTemplateResponseDto contrastTemplate, String pkId, List<CrossDbContrastListResponseDto> contrastLists,
                                   CrossDbContrastTaskPo contrastTas, ICrossDbContrastTaskService contrastTaskService) {
        this.contrastTemplate = contrastTemplate;
        this.pkId = pkId;
        this.contrastLists = contrastLists;
        this.contrastTas = contrastTas;
        this.contrastTaskService = contrastTaskService;
    }

    @Override
    public void run() {
        contrastTaskService.doContrast(contrastTemplate, pkId, contrastLists, contrastTas);
    }
}
